The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
The error in line 528 probably has to do with a sub-routine being called without the right number arguments like $KeyFlags or $KeyFlags,$id
It's happening in the onconnect event.

The error in line 559 has to to with a button that is opened in the onnewplayerjoin event, but hasn't got all the needed parameters (like witdht, height, length ect.)

The error in line 636 isn't specific enough to determine here without seeing the code, but is happening in the onconnectwns2 event.

The final two warnings are telling you that files admin2.txt and admin1.txt can't be found on the specified location.
If memory serves me right, they are used in one of the CIF modules build by Kravy.
Yisc[NL]
S3 licensed
I'm still not sure I totally understand what the button should do for you and any other players.
The way I made it now, is that every player gets his own button and when he clicks on it, his own button will go away for 6 seconds.
But when I click my button at let's say 22:30:00, it will come back to me at 22:30:06.
While if you click yours at 22:30:02, it will come back to you at 22:30:08.

On the other hand, if it was one button shown to all connected players (that isn't possible, but there is a way to pretent it is the same button for everyone), it would come down to the first player clicking it, then it goes away on everyones screen and will come back to everyone after 6 seconds.

I have no idea what you mean by "the bump 2 cars colliding is expelled".
Lapper can't detect colliding cars at all, so if you are looking to make that work, you can stop here and now.
Yisc[NL]
S3 licensed

openPrivButton( "event",78,120,20,10,10,-1,ISB_DARK,"^1EVENT",ButtonEvent );

Sub ButtonEvent( $KeyFlags,$id )
closePrivButton("event");
PrivDelayedCommand( 6, ButtonEvent2 );
EndSub

Sub ButtonEvent2( $KeyFlags )
openPrivButton( "event",78,120,20,10,10,-1,ISB_DARK,"^2EVENT",ButtonEvent );
EndSub

I have placed the OpenPrivButton in the OnConnect Event, so that everyone who connects to the server, gets that button.
As soon as you click it, ButtonEvent is called, which closes the button and then executes a DelayedCommand after 6 seconds, to go to ButtonEvent2.
In that event, the button is opened again and when you click it, ButtonEvent is called again.

I hope this is what you want, since you can't draw global buttons.
There is a way to work around that, but I haven't got time to work that out right now.
Yisc[NL]
S3 licensed
Should that button be a central button for all players, or one for every player?
Yisc[NL]
S3 licensed
With a scheduled event there isn't a need to display a button at all.
Just make it execute a piece of code every 6 seconds.
Maybe you could explain a bit more, what it is you want Lapper to do, since I am not totaly sure what you want.
Yisc[NL]
S3 licensed
At least it should be:

UserGroupFromFile( "admin", "./../admin.txt" );

./ to indicate a file will be loaded
../ to go one folder up from the 'includes' directory
Yisc[NL]
S3 licensed
As promised, I am releasing registration system version 1.04
With the following changes:
  • Changed show "registered name" on logon, instead of "LFS username"
  • Added configuration screen to:
    • Set Teamname
    • Set who is allowed to register accounts
    • Set if message is shown when someone logs in
  • Excluded admins from the need to login
  • Added option so that admins can create an account for users
The configuration screen can be opened by admins using: !confreg
The registration screen can be opened by admins using: !register

Download the file, rename it to 'reg_system.lpr' and place it in the 'includes' directory of you Lapper directory.
Also make sure to add the following line to section 'General includes' of file 'addonsused.lpr' which can also be found in the 'includes' directory:

include( "./reg_system.lpr");

The script is tested as good as possible, but there could be one or two bugs.
Please notify me if you ran into a bug and I will try to fix it as soon as possible.
Although I am not looking for any more features to add to this script, I am willing to consider any wanted features.
Yisc[NL]
S3 licensed
That might be possible, but it would be easier to use the scheduler of Lapper and run a task every 6 seconds (so run the task every minute at 0,6,12,18,24,30,36,42,48,54 seconds).
Yisc[NL]
S3 licensed
I spent 3 hours yesterday evening on re-writing the registration system.
I've added a configuration module to be able to tweak a couple of settings and changed most of the script to coop with the new added settings.
After some testing, I think it's nearly ready to be released, which will happen tonight or tomorrow evening.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :Can you edit the file me please? This is another request then it closes the subject.

Sure I could do that, but you won't learn anything from it.
Appearantly, you don't want to learn how to code in Lapper, but want someone else to code for you.
Then your initial question wasn't right and besides that, you can't expect people to work for you for free.
I took the time to give you answers, coded things for you and still the questions and requests keep coming.
That doesn't feel good at all and happens too many times here.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :I do not want to show to all the group.

If you don't want all admins to be able to use !register, you could create a seperate file and add names of people who will be authorised to use the command, to that file.
Then add a command to load that file and check wether someones name is in it or not.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :Is it possible that my service is simple.
I want to be displayed when you enter log on only window
and window register account to be her special administrator is dedicated to open it if send command "!register"

I tried a lot done that, and I could not

It's possible to assign the register window to admins only.
You need to add a check if someone is in the admingroup, when the !register command is executed.
Again, not really hard to accomplish if you know the basics of coding in the Lapper environment.
Yisc[NL]
S3 licensed
Quote from ab12 :Hello, I saw several cruise insim servers and I want to create my own insim me, I did some research and found out that better InSim.NET is the best but I do not know what to do. Can you help me?

If you don't know what to do, I think it would be best to download an already finished Cruise program and start studying that.
Building something from scratch without any knowledge, doesn't sound like a good thing to do.
If you do know something about coding, then it might be an idea to use LFS Lapper as a start, since that will handle a lot of things for you, while you can concentrate on building screens, actions, etc.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :GlobalMsg ("^7".$userName."^7 has logged into the server");

Not license the name, registered in the window registration User Name

And what have you tried to accomplish what you want?
Again, this isn't rocket science to get it done.
In fact, the answer is in the same part of the code as where that GlobalMsg is found.
Good luck finding the answer Wink
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :if click button "Login" send account name in the chat .

You could have easily made that your self, since it only requires you to add one line to the script.
This time I did it for you, but it will be the last time I helped now.
Coding is something people should do themselfs and if you get really stuck (which isn't the same as copy/paste the code from someone else, fire it up and then start screaming what's wrong and/or what you want it to do), then present the code you made so far and describe the problem (and all you tried in order to solve it) as detailed as possible.

Registration & Login system V1.03 - 13-09-2015 - Added message in chat, when someone logs in
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :How can it?

Have a look at the registration system I posted earlier in this thread.
All the code to store/retrieve/change data, is in there.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :Is there a way to control the existing accounts and delete them?

There are some ways to retrieve and change the stored data, but there is no way to delete any stored data.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :I want the amendment to the accounts , the account manually add and delete account

That wouldn't be possible with Lapper.
You can compare data written in text files, or you can add and change things in the Lapper database, but you can't take data out of it.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :In any path to save your UserName and password?

With my system, the details are saved in the Lapper database.
So no need to set a path to a file.
Yisc[NL]
S3 licensed
Quote from Popughini :Is there any way of showing the time from one node to another node?

Yes, if those nodes are at actual splits, Lapper has functions to calculate time between splits.
If the nodes are custom made, you need to built that function your self, by storing the time at node 1 and 2 and then calculate the difference between that.
Yisc[NL]
S3 licensed
Quote from Popughini :Is there any way to put autobanned for users in other countries?

No, since LFS and Lapper can't detect from which country someone is coming.
Not to mention the fact that it is relatively easy to pretent coming from a different country using proxy servers etc.
Yisc[NL]
S3 licensed
Quote from 5Loody-g27 :You could set up registration window in the server?
So that the user name and password to log in to the server is different from the name of the license

Example: Event: onConnect
Show logged-on user name and password window, and it verifies the user name and password in's Register.txt file

if there was the difference in one of the two options are kicked from the server

Just like Bass-Driver, I made a registration system as well (after someone asked for it on this forum).
Not trying to steal the spotlight from Bass-Driver (great to see that you are helping people with Lapper as well), but here's what I made: https://www.lfs.net/forum/post/1856560#post1856560
Yisc[NL]
S3 licensed
This is not good:

9/7/2015 2:45:30 PM -> Syntax error in cfg file "./gui_admin_membership.lpr" at line #194
Wrong NULL index in an array...
Function 'onconnect' script aborted

It means that the onconnect event isn't working at all.
Can you upload your addonsused.lpr and your main LPR script?
In order to be able to do so:

-make a copy of both of those file to your desktop
-rename lpr to txt
-upload both files to this forum
Yisc[NL]
S3 licensed
The file you uploaded is the general Lapper logfile.
Somewhere there must be another "logs" folder, which will contain a file with the name ending on ERR.log
Can you please upload that?
Yisc[NL]
S3 licensed
Have you recently changed any code in Lapper, just before the problem you reported has started appearing?
If so, investigate the code you recently changed.
Besides that, it would be useful to see when the error occurs.
Does it happen when someone connects to your server, joins the track, etc. since that will point you into the direction of the Lapper event that is causing this error.
FGED GREDG RDFGDR GSFDG